package com.callback2;

import java.io.IOException;

public class TestDemo implements Icallback {
	public static void main(String[] args) throws IOException {

		// Http http = new Http();
		// http.init(new Icallback() {
		//
		// @Override
		// public void succ(Object obj) {
		// System.out.println("test" + obj);
		//
		// }
		//
		// @Override
		// public void fail() {
		//
		// }
		// });
		// http.doWork();

		new TestDemo().m();

	}

	private void m() {
		Http http = new Http();
		http.init(this);
		http.doWork();
	}

	@Override
	public void succ(Object obj) {
		System.out.println("test" + obj);

	}

	@Override
	public void fail() {
		// TODO Auto-generated method stub

	}

}
